{extend name="base" /}

{block name="body"}

<a href="{:url('home/states/me')}">我的朋友圈</a>
<a href="{:url('home/states/index')}">大家的朋友圈</a>


<div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
        <form class="layui-form form-container" action="{:url('home/states/save')}" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">所属栏目</label>
                <div class="layui-input-block">
                    <select name="cid" lay-verify="required">
                        {foreach name="category_level_list" item="vo"}
                        <option value="{$vo.id}">{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' ----';}{/php}{/neq} {$vo.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">标题</label>
                <div class="layui-input-block">
                    <input type="text" name="title" value="" required  lay-verify="required" placeholder="请输入标题" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">简介</label>
                <div class="layui-input-block">
                    <textarea name="introduction" placeholder="（选填）请输入简介" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">内容</label>
                <div class="layui-input-block">
                    <textarea name="content" placeholder="" class="layui-textarea" id="content"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">缩略图</label>
                <div class="layui-input-block">
                    <input type="text" name="thumb" value="" class="layui-input layui-input-inline" id="thumb">
                    <input type="file" name="file" class="layui-upload-file">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图集</label>
                <div class="layui-input-block">
                    <button type="button" id="upload-photo-btn" class="layui-btn">上传图集</button>
                    <div id="photo-container"></div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" value="0" title="不分享" checked="checked">
                    <input type="radio" name="status" value="1" title="分享">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">置顶</label>
                <div class="layui-input-block">
                    <input type="radio" name="is_top" value="1" title="置顶">
                    <input type="radio" name="is_top" value="0" title="未置顶" checked="checked">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">推荐</label>
                <div class="layui-input-block">
                    <input type="radio" name="is_recommend" value="1" title="推荐">
                    <input type="radio" name="is_recommend" value="0" title="未推荐" checked="checked">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">发布时间</label>
                <div class="layui-input-block">
                    <input type="text" name="publish_time" value="{:date('Y-m-d H:i:s')}" class="layui-input datetime">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>

                <div class="layui-input-block">
                    <input type="text" name="sort" value="0" required  lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
</div>


{/block}